package com.dgut.legalservice.service.impl;

import com.dgut.legalservice.dao.IUser;
import com.dgut.legalservice.domain.User;
import com.dgut.legalservice.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private IUser iUser;


    @Override
    public int addNormalUser(User user) { //添加普通用户账户
        iUser.addNormalUser(user);
        return 0;
    }

    @Override
    public int addLawUser(User uer) {
        return 0;
    }

    @Override
    public int addManager(User user) {
        iUser.addManager(user);
        return 0;
    }

    @Override
    public int addUser(User user) {
        iUser.addUser(user);
        return 0;
    }

    @Override
    public int insertUser(User user) {
        iUser.insertUser(user);
        return 0;
    }

    @Override
    public void updateNormal(User user) {
        iUser.updateNormal(user);
    }

    @Override
    public void updateHead(User user) {
        iUser.updateHead(user);
    }

    @Override
    public void updateNormalBase(User user) {
        iUser.updateNormalBase(user);
    }

    @Override
    public void updateNorUser(User user) {
        iUser.updateNorUser(user);
    }

    @Override
    public void updateCompanyInfo(User user) {
        iUser.updateCompanyInfo(user);
    }

    @Override
    public void updatePassword(User user) {
        iUser.updatePassword(user);
    }

    @Override
    public void updateEmail(User user) {
        iUser.updateEmail(user);
    }

    @Override
    public void updateSuper(User user) {
        iUser.updateSuper(user);
    }

    @Override
    public void editUser(User user) {
        iUser.editUser(user);
    }

    @Override
    public List<User> findByNameAndType(String realName, String type) {
        return iUser.findByNameAndType(realName,type);
    }

    @Override
    public List<User> findByRealName(String realName) {
        return iUser.findByRealName(realName);
    }

    @Override
    public List<User> findByType(String type) {
        return iUser.findByType(type);
    }


    @Override
    public List<User> findAllNormal() {  //查找所有普通用户
        return iUser.findAllNormal();
    }

    @Override
    public String findPhotoAttId(String loginName) {
        return iUser.findPhotoAttId(loginName);
    }

    @Override
    public List<User> findManager() {
        return iUser.findManager();
    }

    @Override
    public User findByLoginName(String loginName) {
        return iUser.findByLoginName(loginName);
    }

    @Override
    public List<User> findNotSuper() {
        return iUser.findNotSuper();
    }

    @Override
    public List<User> findNormal() {
        return iUser.findNormal();
    }

    @Override
    public User findById(Integer id) {
        return iUser.findById(id);
    }

    @Override
    public void deleteUser(Integer id) {
        iUser.deleteUser(id);
    }

    @Override
    public void ice(Integer id) {
        iUser.ice(id);
    }

    @Override
    public void unIce(Integer id) {
        iUser.unIce(id);
    }

    @Override
    public void resetPwdById(Integer id,String password) {
        iUser.resetPwdById(id,password);
    }

    @Override
    public User findByEmail(String email) {
        return iUser.findByEmail(email);
    }

    @Override
    public String findQuestion(String loginName) {
        return iUser.findQuestion(loginName);
    }

    @Override
    public String findAnswer(String loginName) {
        return iUser.findAnswer(loginName);
    }


}
